import React from 'react';
import { Button, Divider, Space, Table, Tag } from 'antd';

const { Column, ColumnGroup } = Table;


interface SearchtableProps {
  dataSource: DataType[];
  onPageChange: (page: number, pageSize?: number) => void;
}

const handleStatusChange = (orderId: string, newStatus: string) => {
  // Add your logic to handle status change here
  console.log(`Changing status of order ${orderId} to ${newStatus}`);
};
export const Searchtable: React.FC<SearchtableProps> = ({ dataSource, onPageChange }) => (



  
  <Table dataSource={dataSource} onChange={(pagination) => onPageChange(pagination.current || 1, pagination.pageSize)}>
    <Column title="测肤时间" dataIndex="prodName" key="prodName" />
    <Column title="肤龄" dataIndex="prodCount" key="prodCount" />

    <Column title="皮肤分数" dataIndex="price" key="price" />
    {/* <Column title="订单号" dataIndex="orderNumber" key="orderNumber" />
    <Column title="总价" dataIndex="actualTotal" key="actualTotal" />
    <Column title="订单状态" dataIndex="status" key="status" /> */}
    {/* <Column
      title="操作"
      dataIndex="tags"
      key="tags"
      render={(tags, record: any) => (
        <div className="space-x-4">
          <Button type="primary" onClick={() => handleStatusChange(record, 'newStatus')}>
           查看用户信息
          </Button>

          <Button type="primary" onClick={() => handleStatusChange(record, 'newStatus')}>
          查看测肤记录
          </Button>

        </div>

      )}
    />, */}


<Column
      title="皱纹类型"
      dataIndex="tags"
      key="tags"
      render={(tags: string[]) => (
        <>
 
            <Tag color="blue" >
             抬头纹
            </Tag>
      
        </>
      )}
    />
    {/* <Column
      title="皱纹类型"
      dataIndex="tags"
      key="tags"
      render={(tags: string[]) => (
        <>
          {tags.map((tag) => (
            <Tag color="blue" key={tag}>
              {tag}
            </Tag>
          ))}
        </>
      )}
    />
    <Column
      title="Action"
      key="action"
      render={(_: any, record: DataType) => (
        <Space size="middle">
          <a>法令纹</a>
          <a>抬头纹</a>
        </Space>
      )}
    />  */}
  </Table>
);

